home *** CD-ROM | disk | FTP | other *** search
/ Hornet Underground 1 / Hornet Underground.iso / demonews / demonews.081 < prev    next >
Text File  |  1996-05-07  |  53KB  |  1,125 lines

  1.  ______/\___________________________      __  ________________ ___  /\_______
  2.  \____   \  ________ _   _ ______   \    /  \|  \  ________   |   \/  ______/
  3.  /   |    \  _)   \   \_/   \   |    \  /    \   \  _)   \    |    \______  \
  4. /    |     \       \   |     \  |     \/          \       \  /~\    \    /   \
  5. \_____     /_______/___|     /________/\____\_____/_______/_________/________/
  6.  ===\_____/============|____/========================================[+tZ^]==
  7.  
  8.                               DemoNews Issue #81
  9.                      January 29, 1995 - February 4, 1995
  10.  
  11.                                  ------------
  12.  
  13.   DemoNews is a weekly publication for the demo scene. It is produced at the
  14.    Internet FTP site  ftp.eng.ufl.edu (HORNET).  This newsletter focuses on
  15.   many aspects of demos and demo making. Everyone is welcomed to contribute
  16.                     articles, rumors, and advertisements.
  17.  
  18.     Information about HORNET and DemoNews can be found under /demos/README
  19.  
  20. Start.of.DemoNews.081,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,
  21.  
  22. SIZE:  52,846  SUBSCRIBERS:   Last week: 1220   This week: 1241   Change: +21
  23.  
  24. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  25.  
  26.              SECTIONS          ARTICLES
  27.              ----------------  -----------------------------------
  28.              General           HORNET has been busy!
  29.              New Uploads       Files recieved at HORNET
  30.              NAID              Survival Guide
  31.              Editorial         General Protection Relationships
  32.              Code              Ctrl-Alt-Delete, Now Its a Game!
  33.                                Assembly Part 3 (It ain't no party)
  34.                                BSP Trees
  35.              Back Issues       How to Get 'em, Descriptions
  36.              Closing Comments  Quote for the Week, etc.
  37.  
  38. ,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,
  39.  
  40.  <<General>>
  41.  
  42. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  43.  
  44. _____HORNET has been busy!
  45.  
  46.   Here are just a few things I would like to make the readers of DemoNews
  47.   aware of:
  48.  
  49.   -ANSI:  The ANSI is back on HORNET!  After more flames than I could count
  50.   (even with my socks off), I have decided to have an area on HORNET where
  51.   the "packs" will be stored.  Syntax Error (organizer of iCE) is now
  52.   HORNET's main coorespondent in this field, and he will be maintaining the
  53.   files in this area.  However, there will not be an /incoming/ansi
  54.   directory, only a /demos/ansi. Most of the previous problems stemmed from
  55.   misuse of the /incoming/ansi directory.  Syntax Error will keep up to 10
  56.   megs of the most current and wanted packs on HORNET.  He will be
  57.   personally responsible for keeping this directory updated.  Also, any
  58.   ANSI-related mail will be forwarded to him.  You can reach Syntax Error at
  59.   syntax@io.com.
  60.  
  61.   -MC3PLAY:  MikMak, Rao, Stony, and Air Richter are currently working on a
  62.   Music Contest ]I[ player.  This will be used by the judges and contestants
  63.   alike for playing MC3 entries.  Remember, this contest will be officially 
  64.   announced at NAID on April 15, 1995.
  65.  
  66.   -DNDP:  DemoNews Plus for DOS.  Ior, Psibelius, and Zoltar are currently
  67.   working on a DOS-based version of DemoNews.  More than a plain vanilla-
  68.   ascii reader, this is a full-fledged diskmag!  It will include graphics,
  69.   music, additional articles from the DemoNews staff, and best of all, will
  70.   be released on a MONTHLY basis.  Stay tuned for more details.
  71.  
  72.   -DN/HTML:  Jeff (White Noise) / HORNET deserves a lot of appreciation.
  73.   In the past couple of weeks, he has made enormous strides in making the
  74.   World Wide Web version of DemoNews come to life.  As the entire DemoWorld
  75.   project becomes more concrete, you can expect quite a bit of coverage of
  76.   it in DemoNews.
  77.  
  78.   -SLACKING:  I have been very slow in getting two interviews done.  The
  79.   first is with Stone/Dust, and the second is with Gore/FC.  I finally got
  80.   the questions out to Stone, but the Gore interview still has yet to take
  81.   shape.  My apologies to these two individuals as well as the readers of
  82.   DemoNews for the delay.
  83.  
  84.   -NEW FACES:  Two new individuals have joined the staff of HORNET as
  85.   columnists.  They are Tom Verbeure and GraveDigger.  I met Tom through
  86.   Jason Nunn (dee-cug, another DN columnist and friend).  Tom is an expert
  87.   in the nuiances of hard core Assembler.  GraveDigger is another new
  88.   addition.  Recently he did an incredible review of the Egg music for
  89.   DemoNews, and this week he has done a "Survival Guide for NAID".  I am
  90.   very pleased to have both of these gentlemen furthering the HORNET mission.
  91.  
  92.   -LISTSERVER:  There are two people not mentioned very often in this
  93.   newsletter who do a lot of work for HORNET.  Pi is the TRUE listserver
  94.   coordinator for HORNET.  Whenever the listserver crashes or goes buggy,
  95.   Pi is the guy I count on to bring it back up.  In a slighly different area,
  96.   Martin M. Pedersen does one of the janitorial jobs here at HORNET.  :)
  97.   Each week when DemoNews goes out, I recieve lots of bounced mail
  98.   notifications.  I forward all of these to Martin and he sends me a list
  99.   of who I need to (un)subscribe or help out.  This is not a fun job and I
  100.   really appreciate his help.
  101.  
  102.   -ASPHYXIA TRAINER:  Over the past several months, I have been working on
  103.   converting Denthor's "VGA Demo Trainer Guide" source code from Pascal to
  104.   C++.  In the background of the whole thing, FateGrinder and I shoot around
  105.   ideas about how to optimize different assembler routines, etc.  If you
  106.   look at my code hard enough, you're bound to find some of his influence in
  107.   there.
  108.  
  109.   I know I'm forgetting something...  :)
  110.  
  111. ,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,
  112.  
  113.  <<New Uploads>>
  114.  
  115. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  116.    NOTE: All locations start with /demos and then their respective sub-
  117.          directory.  Please note however that the actual base directories
  118.          (like /pub/msdos/demos) may differ from mirror to mirror.
  119.  
  120. Location          Filename.Ext  Size  Description
  121. ----------------  ------------  ----  ----------------------------------------
  122.  
  123.                                   /demos
  124.  
  125. /alpha/NEW        answer  .zip    40  Answer by Warlock of Amnesty
  126.                   dfuse   .zip    10  Digital Fuse intro by Uncle Bob/Zion
  127.                   einstein.zip     9  BBS Intro for Einstein BBS
  128.                   friends .zip   875  Straight Line Connection for 3S Party 94
  129.                   greetro .zip   199  Happy New Year by Sunrise
  130.                   kiddo   .zip   132  A.P.E.X Presents an Intro called Kiddo
  131.                   mciesc  .zip    14  BBStro for MCI Escapes by Subsystem
  132.                   meet95  .arj   708  Something from Sti/Euphoria (GUS)
  133.                   naidtro .zip   144  The NAID Party Intro (SB only)
  134.                   southfix.zip    79  BBS Intro for South of Heaven by Omicron
  135.                   tornado .zip    23  Shocker presents Tornado Intro (no mus)
  136.                   xmas_dem.zip   658  Christmas Demo by The Paralytic Minds
  137. /diskmags         bm9     .zip   580  Blackmail Issue #9 (stuff from TP94)
  138.                   yahoo04 .zip   286  Yahoo #4, The Hangover Issue
  139. /nets             dginfo18.zip    16  Demogroups Interchange InfoPacked v1.8
  140. /news             nad_u01 .zip  1428  New Age Demo Database Upgrade: 1
  141.  
  142.                                     /code
  143. /demosrc
  144.                   fcsp2src.zip    31  FC's StarPort BBS ][ Source
  145.                   incosrc .zip   241  Source to Inconexia demo by Iguana
  146.                   isad2src.zip    20  ASM source for Immortal Syndicate BBS
  147.                   kuk2src .lzh   159  Source for Pleasure Access BBS
  148.                   sea_code.zip    33  ASM Source to Seasick / VLA
  149.                   sqd1_src.zip    21  ASM Source to Squid1.com (BBS Intro)
  150. /graph/lens       lenssrc .zip    40  BAS, ASM example of a Lens
  151. /graph/pallette   fadecode.zip    30  C,ASM source for fades and pallette rot
  152.                   palrot  .lzh     2  Pallette Rotate by Draeden / VLA
  153. /graph/plasma     c_plasma.zip    55  C source code to color plasma
  154.                   jclplasm.zip    88  ASM,C For NICE color Plasma
  155. /graph/shadebob   jeffbobs.lzh    75  PAS source for Shade Bobs
  156. /graph/tutor      tut9new .zip    43  Part 9 of Asphxia VGA demo tutor in C++
  157. /pmode            dpmispec.arj    33  Protected Mode API For DOS Extended Apps
  158.                   protect .lzh    15  ASM Protected Mode programming example
  159. /sound            fmed101 .zip   147  OPL3 FM Sound Editor for Programmers
  160.                   gp15-pas.zip    46  PAS source for GUS Modplayer
  161.                   gusenv  .zip     1  ULTRASND environment checking in ASM
  162.                   gusp15  .lzh    19  ASM source for GUS Modplayer
  163.                   pps110  .lzh    84  Protracker Playing Source/Josh Jensen
  164. /utils            basm10  .zip   297  Basic to ASM Language Translator
  165.                   frmi!150.exe    38  Flat Real Mode Interface v1.5
  166.  
  167.                                    /music
  168.  
  169. /disks            f10_pck2.zip        Force Ten Pack #2
  170.                   f10_pck3.zip        Force Ten Pack #3
  171.                   f10_pck4.zip        Force Ten Pack #4
  172.                   rot     .zip        Rotation by Neophyte mini musicdisk
  173.                   traxx36 .zip        Latest Traxx album
  174. /programs/frntend mplay12 .zip        Musicplay 12.0 frontend music program
  175. /programs/misc    readcda .zip        Read digital data from CD using CDROM
  176. /programs/players radv1_0a.zip        ADLIB tracker package (anyone use FM!?)
  177. /songs/s3m        belly   .zip        Belly's Theme by Falcon (FM ADLIB)
  178.                   cannabis.zip        Cannabis sativa by Transee
  179.                   dnc2trnc.arj        Dance to the Trance by Hector
  180.                   doom-hth.arj        Doom and Stuff by Hector
  181.                   dreary  .arj        Dreary as all hell by Hector
  182.                   epi-opus.zip        Opuscule by MusicMan/Epinicion
  183.                   firesirn.arj        Firesiren by Hector
  184.                   gonnadie.arj        We're All Gonna Die by Hector
  185.                   k-udream.zip        Unfaithful Dream by Boomer the Bass Pig
  186.                   messiah .zip        Messiah by Transee
  187.                   mindrave.zip        Mind of a Raver by Avatar
  188.                   mystwat2.zip        Myst Water by Hector/DMK
  189.                   mystwatr.zip        Part 2 of the above
  190.                   nois    .zip        Nois by Kevin, Fast drums & strange sou
  191.                   pl_dt   .zip        Song by Plastique/Dep
  192.                   pl_heart.zip        "
  193.                   pl_know .zip        "
  194.                   pl_move .zip        "
  195.                   pl_rave .zip        "
  196.                   pl_thund.zip        "
  197.                   pl_uknow.zip        "
  198.                   pl_who  .zip        "
  199.                   pl_zany .zip        "
  200.                   renais  .zip        Renaissance by Null
  201.                   rh_cyu  .zip        Song by Red Horizon/Dep
  202.                   rh_insom.zip        "
  203.                   rh_nw   .zip        "
  204.                   rh_ready.zip        "
  205.                   rh_real .zip        "
  206.                   rh_samur.zip        "
  207.                   rh_sea  .zip        "
  208.                   rh_tod  .zip        "
  209.                   rh_vp2  .zip        "
  210.                   sky_jung.zip        Jungle Baby Love by D.J. Skyjump
  211.                   trn-imh .zip        In my Hough by Transee
  212.                   trn-medi.zip        Mental Diary by Transee
  213.                   wait4u  .zip        Waiting for You by Falcoln (Adlib)
  214. /songs/xm         mftp    .arj        Music for the People by (see below)
  215.                   moby-go .arj        Moby-Go by Pieter Van Den Veen
  216. /text             life    .zip        Some text about a new group
  217.  
  218. ,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,
  219.  
  220.  <<NAID>>
  221.  
  222. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  223.  
  224. _____Survival Guide by GraveDigger
  225.  
  226.     +         .         /\
  227.   .        + .      .  /  \    .    +
  228.    _____ 3\ __3____    \__/_______             Official Survival Guide
  229.    \__  \3 \  3\   \ +  __ \      \                    for the
  230.   .  /   \  \  / _  \  /  \ \____  \  .   North American International Demo
  231.     /  _     \/ /_   \/    \/    3  \                Competition
  232.  . /    \____/    \__/   __/__       \           April 15 - 16, 1995
  233.    \    /  . \____/  \__/  +  \______/ww
  234.  :::\__/::::::::::::::::::::::::::::::::
  235.  
  236.  Here is a practical(?!) guide to surviving NAID, the upcoming North American 
  237.  International Demoparty, which is to be held in Quebec on April 15th and 
  238.  16th. There's still a few months left to prepare yourself for this event, 
  239.  so I decided to provide this guide for anyone who intends to attend. I hope 
  240.  you find this guide helpful, and remember to pack light. If you plan to 
  241.  sleep at the school, there will be a lot of people in one big room, unless 
  242.  you've reserved a room for a group. Of course, feel free to donate me some
  243.  space if you're getting a hotel room.
  244.  
  245.  By the way, the above NAID logo was borrowed from the FILE_ID.DIZ of the
  246.  naidtro.zip archive. I couldn't draw a logo of my own, and I liked that one 
  247.  a lot, so there it is.
  248.  
  249.  Personally, I have never attended a demoparty, though I have some ideas on
  250.  how to prepare for it, as I'm more familiar with Canada than I am with 
  251.  Finland or Denmark. I'm hoping this guide can help everyone have the best
  252.  possible time at NAID. This being the first party of this kind on this side 
  253.  of the puddle, I would like to see the date go down in history, and the 
  254.  party repeated in years to come. We need to show the Euros that we know how
  255.  to party, too!
  256.  
  257.  Please keep in mind that this guide is intended merely as a complement to
  258.  your regular luggage checklist. For your convenience, though, a small box 
  259.  has been placed next to each item so you can check it off as you pack it. 
  260.  Even though you now have this list, don't forget items like toothbrushes, 
  261.  toothpaste, deodorant or anti-perspirant... Oh, hell with it. I'll probably 
  262.  be the first to forget these items anyways. (Hope there's a drugstore in the 
  263.  vicinity?)
  264.   _
  265.  |_| 1. First, you will need an English-French dictionary. As you know, 
  266.      Quebec is the French-speaking region of Canada. Comment vas tu? Tu 
  267.      habites aux Etats-Unis? Parlez-vous francais? Hmm. You might need to 
  268.      work on your accent, too.
  269.   _
  270.  |_| 2. Next, you might want to take a life-jacket. Considering that a large 
  271.      portion of you will be crossing the St. Lawrence River to get to the 
  272.      school where NAID is being held, you don't want to take your chances 
  273.      with those bridges. 
  274.   _
  275.  |_| 3. You will want to have a source of caffeine. Whether it be in the form 
  276.      of money for soda machines or coffee, or your own beverage supply, it 
  277.      will be required to stay up after hours and party, at which time you 
  278.      will probably consume more caffeine, and party some more... and hell, 
  279.      who really wants to sleep anyways?
  280.   _
  281.  |_| 4. Be sure to pack your teddy bear if you have one. Yeah, just look at 
  282.      that poor little guy sitting on your bed. How do you think he feels when 
  283.      you just leave him there?
  284.   _
  285.  |_| 5. Bring along unfinished programs and songs and such, and maybe you can 
  286.      get together with someone else who has a pute and some knowledge, and 
  287.      work on it with them. In fact, here's a C program that I started which I 
  288.      need help with. If anyone can assist me, please let me know. (I just 
  289.      recently took up C as a hobby, so please bear with me.)
  290.  
  291.  -----[cut]-----[blah.c]-----
  292.  
  293.  #include <stdio.h>             /*    Blah v1.0.0  */
  294.                                 /*      1/04/95    */
  295.  void main()
  296.  { printf("The program is now running.");
  297.  }
  298.  
  299.  -----[cut]-----[blah.c]-----
  300.  
  301.  I'm not sure what this program is going to be used for, but I'm sure once
  302.  it is completed it will be really cool. :)
  303.   _
  304.  |_| 6. If you bring your own computer to NAID, be sure to lock it up, if at 
  305.      all possible. At other recent demoparties, especially The Party 94, 
  306.      equipment was stolen or damaged. This only applies if you're not bringing 
  307.      your kid brother's CoCo, in which case you should leave it out in plain 
  308.      sight, and hope it gets stolen. Then, when the culprit is caught, 
  309.      everyone can point and laugh, and this should prove to be a funny 
  310.      experience, for all except one person. Hey, win some, lose some, right?
  311.   _
  312.  |_| 7. You might want your own roll of toilet paper. Hey, you never know... 
  313.      I can imagine that it sucks to get stuck on the can without toilet paper. 
  314.      Have you ever hobbled down the hall to your toilet paper supply with your 
  315.      pants down? Uhh.. not that I ever have, I just don't imagine it being 
  316.      something any of you would want to get stuck doing. Yeah, that's it.
  317.   _
  318.  |_| 8. If you have a flashlight, bring it with you. This can be used for 
  319.      finding the bathroom in the middle of the night, or just for reading 
  320.      porno magazines in your sleeping bag. For the latter option, this will 
  321.      let everyone around you locate you, and you can then trade porno 
  322.      magazines with each other. However, please keep in mind that I do not 
  323.      read porno magazines, nor do I promote pornography. <cough>
  324.   _
  325.  |_| 9. If you have a beeper or pager, leave it home if possible. It would be 
  326.      just plain annoying to be watching a demo when all of a sudden, someone's 
  327.      beeper goes off, half the crowd turns to find the source of the noise, 
  328.      and misses the best part of the demo. Though it would be funny to hear a 
  329.      tune with such a sound in it, or even a phone ringing, and watch everyone 
  330.      looking for it.
  331.   _
  332.  |_| 10. Keep a calculator with you and keep track of the exchange rate for 
  333.      your currency. You don't want to get ripped off when buying stuff or 
  334.      exchanging your money. And in the event you want to sell something, you 
  335.      can rip them off if you do it right.
  336.   _
  337.  |_| 11. You might want to bring some homework with you. You'll most likely 
  338.      be away from home all weekend, and you might have some extra time during 
  339.      which you can study. Or if you're really lucky, your books will get 
  340.      stolen and you won't bother going to class anymore.
  341.   _
  342.  |_| 12. Bring a portable radio. If you live somewhat far from Quebec, you can 
  343.      occupy yourself by finding cool radio stations that you'll never be able 
  344.      to hear again after Sunday. You'll also have something to look forward to 
  345.      when NAID '96 is planned.
  346.   _
  347.  |_| 13. Two words: breath mints. :)
  348.   _
  349.  |_| 14. Grab a flat-head screwdriver to take with you. What for? I don't 
  350.      know. Wait, hmm. Looks like I have run out of ideas for this list.
  351.  
  352.  I hope this guide becomes a part of your trip to NAID. Print it out, have it
  353.  translated into french, sign language, and braille. Share this guide with 
  354.  others planning to attend. Fax it, snail mail it, tape it to your forehead.
  355.  Memorize it backwards. Also, If you have any additions to this above list, 
  356.  please contact me at the email address below. Anyways, hope to see you there!
  357.  
  358.  GraveDigger [uuDW/CoRE]
  359.  digger@freeside.scsd.k12.ny.us
  360.  
  361. ,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,
  362.  
  363.  <<Editorial>>
  364.  
  365. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  366.  
  367.  Much response was generated by last week's humorous editorial entitled
  368.  Codethink(School);.  This week, I take a U-turn from humorous to dramatic
  369.  (hey, you can't expect me to be in the same mood every week).
  370.  
  371.  One small note: I will make frequent use of the pronoun "they" as being
  372.  third-person singular.  It is incorrect grammatically to have a sentence
  373.  such as "Ask someone a question and THEY will give you an answer".  The
  374.  sentence should be "Ask someone a question and he or she will give you an
  375.  answer".  However, I will be using "they" as in the above example rather
  376.  than filling this editorial with "he/she" everywhere.  Enough said, let's
  377.  go on...
  378.  
  379. _____General Protection Relationships
  380.  
  381.  re-la-tion-ship, noun 1. a connection, association, or involvement.
  382.  
  383.  Without exception, every one of us in the demo scene has two things in
  384.  common: we interact with computers and we interact with humans.  In
  385.  essence, we have relationships with both.  Under close inspection, these
  386.  relationships can actually reveal an amazing amount about who we are as
  387.  individuals and how successfully we deal with others in our lives.
  388.  
  389.  Ask a computer what the sum of two plus two is and it will tell you four.
  390.  Ask a human the same question and they will probably raise their eyebrows
  391.  and wonder which mediation you've been taking.  Ask that same person if
  392.  they want to go and see a movie.  Mabey they're sick, or busy, or tired, or
  393.  just don't want to.  If you're lucky they might even say "yes".  Ask a
  394.  computer if it wants to run a program.  It might have difficulty, but that
  395.  computer will die, trying to make you happy.
  396.  
  397.  If you think about it, a computer is your ultimate friend.  It never tells
  398.  you to get some sleep or do your homework.  Its always there, waiting
  399.  patiently for you to make a request.  With games, demos, and various GIFs,
  400.  the computer can give you hours and hours of entertainment.  Even more,
  401.  your computer actually changes with you: it remembers what you have done
  402.  in the past and keeps track of what's new in your life.
  403.  
  404.  How many times have you had an argument with someone and gone to your room
  405.  to watch Second Reality or play a game of DOOM?  In that respect, a
  406.  computer can help relieve stress.  The computer is always in your corner,
  407.  willing to help out with any problem you might have at the time.
  408.  
  409.  Over the years, I have had a lot of difficulty in forming lasting relation-
  410.  ships with members of the opposite sex.  Part of this stems from my
  411.  inability to correctly guess what they "mean" all of the time.  Say I ask
  412.  woman X if she wants to go and eat at McDonalds.  The reply is "well...ok".
  413.  Let's just take a few possible interpretations of this answer:
  414.    1. "I am tired of eating at McDonalds, can't you think of anywhere else?"
  415.    2. "I don't really care where we eat."
  416.    3. "While I was saying the word 'well', I was actually trying to think
  417.       of some place else we could eat.  I couldn't, so I guess McDonalds
  418.       is 'ok'."
  419.    4. "That was just a silly answer.  You know I always love to at at
  420.       McDonalds!"
  421.    5. "The only reason my answer came out like that was because I was
  422.       watching the road for you to make a mistake while driving."
  423.    6. "What?  Are you trying to tell me I'm FAT?"
  424.  The list of guesses goes on and on.  A computer only HAS two answers,
  425.  yes and no (1 and 0).  Its nice not having to play mind games once in a
  426.  while.
  427.  
  428.  The computer is a shield between you and reality.  It can transport your
  429.  mind away from the physical world; away from the problems, the headaches,
  430.  the work, and the daily routines that we go through every day.  The more I
  431.  think about it, I realize that our "Escape" CD was very appropriately
  432.  named.
  433.  
  434.  As this article draws to a close, I begin to wonder if its any good or if I
  435.  should just delete the whole thing and call it a day.  I just asked my
  436.  computer if it likes the article and it wouldn't tell me.  Oddly enough, I
  437.  feel like calling my parents right about now.
  438.  
  439.  -Christopher G. Mann / HORNET   January 29, 1995
  440.  
  441. ,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,
  442.  
  443.  <<Code>>
  444.  
  445. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  446.  
  447. _____Ctrl-Alt-Delete, Now Its a Game! by Denthor
  448.  
  449.  Telephone conversation :
  450.  <Ring> <Ring>
  451.  <Click>
  452.  Fanus   : Hello, Buys residence.
  453.  Denthor : Hi there Fanus, whats up? Can I speak to Piet?
  454.  Fanus   : Ummm ... he's not in ... ummm ... who is this? I don't recognize
  455.            you.
  456.  Denthor : Don't worry, it must be my new haircut.
  457.  Fanus   : Oh. This must be Denthor.
  458.  
  459.  Hi all! I am back after a two week absence from the Demuan List. Today I am
  460.  going to introduce you to two new games, which should make sitting at the
  461.  computer and listening to music a lot more fun.
  462.  
  463.  The first game is one I have described before in my trainers. It requires
  464.  two people and a computer. I like to call it Control-Alt-Delete. Here is
  465.  how it works. One person gets the delete button, and the other person gets
  466.  the Control and Alt buttons. Player one must then hit delete very quickly,
  467.  while player two has to try and hit control and alt at the same time. If
  468.  the computer reboots, player two wins, otherwise player one stays at his
  469.  station. When player one wins, they swap sides and begin again.
  470.  
  471.  This game can provide hours of enjoyment, and really is great fun in
  472.  between really boring lectures about stuff you learned years ago. When I
  473.  invented the game, I thought I was doing really badly against Pipsy until I
  474.  realised that the computer had frozen.
  475.  
  476.  Note : People have caught on how to play at the local university, and sneak
  477.  up and play it on my computer while I am telnetting. Be warned. Also, the
  478.  game isn't as much of a challenge when you play it by yourself.
  479.  
  480.  The second game I invented while I was on holiday last week (one of the
  481.  reasons I didn't write an article) ... we were down the South Coast, stuck
  482.  in a hotel room while it poured with rain outside. The Tugela river
  483.  overflowed it's banks, the sand bars dissapeared, and the tan I was hoping
  484.  to get never appeared. (I have been programming so much I haven't seen the
  485.  sun for the past three months, so when I finally get to go away, it rains,
  486.  of course. Way to go, Murphy.)
  487.  
  488.  Anyway, with no computers, no phone, South African TV and no nightlife, we
  489.  had no choice but to listen to the radio. After a while of mind numbing
  490.  boredom, I invented a new game. I haven't named it yet, but here goes. You
  491.  listen to a song on the radio. Every time the singer says a word that is
  492.  more then one syllable long, you add a point. You don't count words twice,
  493.  or all songs would get a high score.
  494.  
  495.  Most of the songs got between three and five, but we lost count when they
  496.  played a Counting Crows song. Ace of Base did surprisingly well, wile some
  497.  rap artists didn't score anything. Try it, you'll be amazed.
  498.  
  499.  The PC Games Programming Encyclopedia part two will be out on the 10th of
  500.  Febuary, I will make sure that Hornet is one of the first sites to get it.
  501.  I hope to have up to number 20 of my trainer series in it.
  502.  
  503.  So, I leave you to pick a game and start playing!
  504.  
  505.  Byeeeee...
  506.  
  507.  Denthor - denthor@beastie.cs.und.ac.za
  508.  
  509.  PS. This no-GUS thing is a Creative Labs conspiracy, isn't it?
  510.  
  511.  
  512. _____Assembly Part 3 by Jason Nunn
  513.  
  514.      \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  515.      \\\\\\\\[ "Implementation Techniques" - Assembly Part III
  516.      \\\\\\\[[  By Jason Nunn
  517.      \\\\\[[[[
  518.      \\[[[[[[[
  519.      ____________________________________________________________________
  520.  
  521.  In this issue I will be discussing the basic nuts and bolts on how to
  522.  implement an assembly program geared towards a demo. This article is
  523.  intended for the C or Pascal programmer who hasn't quite got the confidence
  524.  to use a full blown assembly compiler. In the first part, you may remember
  525.  me telling you of a friend that has reached a turning point in his coding
  526.  development, yet he still won't "take the plunge" because he doesn't have
  527.  access to all the nice perks of 3GL's, like sine, cosine, and random
  528.  functions and larger precision variables than the chip itself. This issue
  529.  will hopefully provide that incentive.
  530.  
  531.  But...., before we do that, I would like to first finish off last article's
  532.  talk on optimization. I forgot to include the fast string functions. I'm
  533.  not going to waffle on too much about this now, as this article is
  534.  dedicated to "assembly techniques". All I will do here is show my results,
  535.  and give out some tips.
  536.  
  537.  Same things apply on this run - my machine is a 486-33 ISA, operating in
  538.  P-mode, and the lower the number, the faster a given instruction is.
  539.  
  540.          STOSB   [209729]                MOV     [EDI],AL   [134226]
  541.                                          INC     EDI
  542.  
  543.          STOSD   [306805]                MOV     [EDI],EAX  [244208]
  544.                                          INC     EDI
  545.  
  546.          LODSB   [209729]                MOV     AL,[ESI]   [134226]
  547.                                          INC     ESI
  548.  
  549.          STOSD   [306805]                MOV     EAX,[ESI]  [244208]
  550.                                          INC     ESI
  551.  
  552.          MOVSB   [228550]                MOV     AL,[ESI]   [142124]
  553.                                          MOV     [EDI],AL
  554.                                          INC     ESI
  555.                                          INC     EDI
  556.  
  557.          MOVSD   [384379]                MOV     EAX,[ESI]  [324112]
  558.                                          MOV     [EDI],EAX
  559.                                          INC     ESI
  560.                                          INC     EDI
  561.  
  562.  Of course, REP operations are faster than their equivalent by about half.
  563.  In general, it is better to use MOV's and INC's to perform one off
  564.  operations. So if you're coding with these instructions, chances are that
  565.  you can get a bit more speed out of your code.
  566.  
  567.  Ok, now on with the main talk. Generally, I won't be going into great depth
  568.  as there are plenty of tutorials and manuals on the net that explain the
  569.  rank basics of assembly. My role here will be to highlight and familiarize
  570.  extrordinary things about coding methods of assembly.
  571.  
  572.  If you've never coded in assembly, then it may pay you to write your
  573.  equivalent program in a 3GL first and before converting it over. I guess it
  574.  depends on the person. I prefer to implement idea's in straight assembler.
  575.  I'm comfortable with the language enough to mumble it in my sleep and their
  576.  are no barriers or contingencies like there are in 3GL code. You can also
  577.  run into serious problems when converting to your target language, but I'm
  578.  sure that there are as many negative points about doing this as they are
  579.  positive points.
  580.  
  581.  How to crunch huge numbers
  582.  --------------------------
  583.  
  584.  One of the first questions a new demo coder may ask is how he/she could
  585.  add, multiply or subtract a number that is larger than the precision of the
  586.  chip. Well, this really doesn't apply now, as the standard is 32 bits. This
  587.  is ample for nearly all calculations, but for those of you that may want to
  588.  perform a 64 bit ADD calculation, this is how you do it:
  589.  
  590.          ADD     EAX,ECX
  591.          ADC     EDX,0
  592.  
  593.  In this example, we don't have a 64 bit register, therefore we must make
  594.  two data sources, whether they be registers or memory references to act as
  595.  one large register. In our case, EDX and EAX act as one. EAX contains the
  596.  least significant data and the EDX contains the most significant data of
  597.  our 64 bit number. ECX contains the number we are adding to this 64 bit
  598.  concatenated register. The basic idea behind this is that we first add ECX
  599.  to EAX. If the number in the EAX register "clocks" then the CPU's carry
  600.  flag will be set.
  601.  
  602.  The next instruction - ADC (for those of you that don't know) is a funny
  603.  sort of ADD instruction that performs two add instructions. It will first
  604.  add the source register to the destination register, and then add 1 to the
  605.  source register if the carry is set. Hence the name "ADD ON CARRY". In our
  606.  example, if the carry flag is set, we will only add in the carry flag as
  607.  the source value is zero. Therefore, if the least significant component of
  608.  our 64 bit variable (EAX) clocks, the it will carry over to the EDX
  609.  component.
  610.  
  611.  Although the above example only adds a 32 number to the 64 bit number. If
  612.  you wanted to add a 64 bit number to a 64 number then you would adopt the
  613.  following:
  614.  
  615.          ADD     EAX,ECX
  616.          ADC     EDX,0
  617.          ADD     EDX,EBX
  618.  
  619.  Where EDX:EAX is the destination 64 register, and EBX:ECX is the source
  620.  register.
  621.  
  622.  To add larger precision's, we simply chain!. Here we are adding a 32 bit
  623.  number that resides in EAX to a 128 bit number which is stored in
  624.  EDX,EBX,ECX and ESI.
  625.  
  626.          ADD     EDX,EAX
  627.          ADC     EBX,0
  628.          ADC     ECX,0
  629.          ADC     ESI,0
  630.  
  631.  To subtract, the same principle applies, accept we use SUB and SBB
  632.  instructions:
  633.  
  634.          (a)                                     (b)
  635.          SUB     EAX,ECX                         SUB     EAX,ECX
  636.          SBB     EDX,0                           SBB     EDX
  637.                                                  SUB     EDX,EBX
  638.  
  639.  With the 486's math coprocessor, the large multiplication and division is
  640.  more viable than our old conventional way of calculating large numbers;
  641.  which as you will see and very slow. Pretty soon, I will be exclusively
  642.  using coprocessor calculations in my demos, as they are extremely popular
  643.  now. Hence rendering the following code (for me) obsolete. However, for
  644.  names sake, I'll discuss the old way of doing things...
  645.  
  646.  For multiplying a 64 bit variable to a 32 bit variable you can use this
  647.  algorithm:
  648.  
  649.          MOV     EAX,ESI
  650.          MUL     EBX
  651.          PUSH    EAX EDX
  652.          MOV     EAX,ESI
  653.          MUL     ECX
  654.          POP     ECX EBX
  655.          ADD     ECX,EAX
  656.  
  657.  As a formula, the code is equivalent to this: ECX:EBX = ECX:EBX*ESI.
  658.  
  659.  Note that you can chain this one also by taking the EDX value from the
  660.  second MUL and multiplying it by the next significant register of the
  661.  source and adding that answer into the respective register of the
  662.  destination.
  663.  
  664.  Dividing is a little bit more complex. How complex?...this complex:
  665.  
  666.          PROC LONG_DIV
  667.            OR            EBP,EBX
  668.            JZ            @@jump_0599
  669.            PUSH          EBP
  670.            MOV           EBP,ECX
  671.            OR            EBX,EBX
  672.            PUSHF
  673.            JNS           @@jump_0548
  674.            NOT           ECX
  675.            NOT           EBX
  676.            ADD           ECX,01
  677.            ADC           EBX,00
  678.          @@jump_0548:
  679.            OR            EDX,EDX
  680.            PUSHF
  681.            JNS           @@jump_0557
  682.            NOT           EAX
  683.            NOT           EDX
  684.            ADD           EAX,01
  685.            ADC           EDX,00
  686.          @@jump_0557:
  687.            MOV           ESI,ECX
  688.            MOV           EDI,EBX
  689.            XOR           ECX,ECX
  690.            XOR           EBX,EBX
  691.            MOV           EBP,0021h
  692.          @@jump_0562:
  693.            RCL           ECX,1
  694.            RCL           EBX,1
  695.            SUB           ECX,ESI
  696.            SBB           EBX,EDI
  697.            JNB           @@jump_0570
  698.            ADD           ECX,ESI
  699.            ADC           EBX,EDI
  700.          @@jump_0570:
  701.            CMC
  702.            RCL           EAX,1
  703.            RCL           EDX,1
  704.            DEC           EBP
  705.            JNZ           @@jump_0562
  706.            POPF
  707.            JNS           @@jump_058A
  708.            NOT           ECX
  709.            NOT           EBX
  710.            ADD           ECX,01
  711.            ADC           EBX,00
  712.            POPF
  713.            JNS           @@jump_058D
  714.            JMP           @@jump_0597
  715.          @@jump_058A:
  716.            POPF
  717.            JNS           @@jump_0597
  718.          @@jump_058D:
  719.            NOT           EAX
  720.            NOT           EDX
  721.            ADD           EAX,0001
  722.            ADC           EDX,00
  723.          @@jump_0597:
  724.            POP           EBP
  725.          @@jump_0599:
  726.            RET
  727.          ENDP
  728.  
  729.  This formula divides EDX:EAX by EBX:ECX. Just in case anybody recognizes
  730.  this thing, I've reversed it from a certain popular commercial package (not
  731.  giving any names) hehe :). I havn't used it since my real mode days
  732.  (which, for the record is about 2 years ago when coding TC669), and it's
  733.  basically optimized for that. I've made no attempt to optimize it for
  734.  P-mode, as I most likely will never use it ever again.
  735.  
  736.  How to implement a Decimal point (or rather - a hexadecimal point :)
  737.  --------------------------------------------------------------------
  738.  
  739.  Now that we have discussed the ways in which we can do a whole range of
  740.  calculations, your next question is how to implement floating/none discrete
  741.  calculations. For that, we must take a register/memory unit and divide it
  742.  into two parts. The number and a mantissa. For the sake of efficiency, you
  743.  would typically contain this in a single register, namely a 32 bit
  744.  register. I usually use this type of construct (represented in binary):
  745.  
  746.           /------------32 bits------------\
  747.           NNNNNNNNNNNNNNNN.MMMMMMMMMMMMMMMM
  748.  
  749.  Here you have a 16 bit actual number, with a 16 bit mantissa. As you can
  750.  see the actual number is of a higher order than normal. If to wanted to
  751.  extract the number from this variable, you can simply perform a SHR 16.
  752.  This will arrive you at the "NNN...." component of the number. Here is an
  753.  example of 1 and a half:
  754.  
  755.          0000000000000001 1000000000000000b
  756.  
  757.  If we wanted the discrete part of the number (ie the "1" part), then just
  758.  perform a SHR 16, which arrives us at: 0000000000000001. As you can see,
  759.  there is no real difference between discrete and non-discrete variables. To
  760.  the machine, it's all the same thing. The difference is the way you
  761.  interpret the product. Calculations are still no different to normal
  762.  numbers. If we wanted to add a "half" to this number then it's as simple
  763.  that this:
  764.  
  765.     MOV     EAX,00000000000000010000000000000000b   ; this is a decimal "1"
  766.  
  767.     ADD     EAX,00000000000000001000000000000000b   ;this is a decimal "0.5"
  768.  
  769.  So, as you can see, it's not very hard. For multiplication, you're going to
  770.  have to include a SHRD instruction, as the number will now be in EDX and
  771.  the mantissa in EAX, hence the precision is now larger. This will return
  772.  the number back to the EAX 32 bit precision that it should be. Here is an
  773.  example:
  774.  
  775.          MUL             ECX
  776.          SHRD            EDX,EAX,16
  777.  
  778.  Here, we multiply EAX by ECX, which arrives at EDX:EAX. Then we just step
  779.  down this answer to arrive at the result, witch will now be contained in
  780.  EAX. With division, it's the opposite:
  781.  
  782.          MOV             EDX,0
  783.          SHLD            EDX,EAX,16
  784.          DIV             ECX
  785.  
  786.  Here we are dividing EAX by ECX. Note the preparation just before the
  787.  divide.
  788.  
  789.  Signed Data
  790.  -----------
  791.  
  792.  As of now, we have only discussed unsigned data. Generally speaking, these
  793.  calculations are very simular, but there are some major differences.
  794.  
  795.  Contained in a given 32 register, unsigned numbers go from 0 to FFFFFFFFh,
  796.  where as 32 signed data range from 80000000h which is the lowest number and
  797.  7FFFFFFFh begin the highest number. When using signed data, there are only
  798.  a couple of extra things you must know. Signed data has its own
  799.  multiplication and division instructions (ie IMUL and IDIV), and its own
  800.  set of conditional jump instructions.
  801.  
  802.    JL (jump if less than) and JLE (jump if less than or equal to)
  803.        are a signed equivalent to
  804.    JB (jump if below)     and JBE (jump if below or equal to).
  805.  
  806.    JG (jump if greater)   and JGE (jump if greater than or equal to)
  807.        are the signed equivalent to
  808.    JA (jump if above)     and JAE (jump if above or equal to).
  809.  
  810.  To change our unsigned divider from this....
  811.          MOV             EDX,0
  812.          SHLD            EDX,EAX,16
  813.          DIV             ECX
  814.  
  815.  ...To a signed divider, simply substitute the MOV EDX,0 with a CDQ. The CDQ
  816.  extends a signed number in EAX into EDX. Example given:
  817.  
  818.          CDQ
  819.          SHLD            EDX,EAX,16
  820.          IDIV            ECX
  821.  
  822.  Implementing Complex mathematical relationships
  823.  -----------------------------------------------
  824.  
  825.  At one time or another, a coder is going to have to use some sort of
  826.  complex mathematical function like triangle ratios, logarithmic factors and
  827.  random numbers to implement various things. To create a function that maps
  828.  a relationship in real time is basically impossible in efficiently terms.
  829.  The only way you can do this is to store relationships in the form of
  830.  tables. This may not be apparent to users of compilers like turbo C etc but
  831.  electronic calculators, compliers, maths coprocessors, spreadsheets all use
  832.  this method of mapping these relationships. it a very fast a convenient way
  833.  of doing things.
  834.  
  835.  The first common function is the random function. A random signal can be
  836.  achieved using the following algorithm. The product of this function is a
  837.  random number stored in the EAX register.
  838.  
  839.          ;input: NIL; output: EAX
  840.          proc random
  841.            mov  ebx,[random_seed1]
  842.            lea  ebx,[ebx*4]
  843.            mov  eax,[ebx+@@rantable]
  844.            mov  ebx,[random_seed2]
  845.            lea  ebx,[ebx*4]
  846.            add  eax,[ebx+@@rantable]
  847.            mov  [ebx+@@rantable],eax
  848.            inc  [byte random_seed1]
  849.            and  [byte random_seed1],01111b
  850.            dec  [byte random_seed2]
  851.            and  [byte random_seed2],01111b
  852.            ret
  853.          random_seed1
  854.            dd    2
  855.          random_seed2
  856.            dd    13
  857.          @@rantable:
  858.            dd 0fd8fce7ah,02d7ad7b7h,0f48a8f3ab,04a3b8f8bh
  859.            dd 0f2dec542h,0a847fab7h,0f4da81aab,04a348f86h
  860.            dd 024547edah,03b535a43h,0b35a535ab,0aa333483h
  861.            dd 0fd2f4e7ah,0c525a5b7h,016d3b4a4b,0643b4fd3h
  862.          endp
  863.  
  864.  If you expand the table to 256 entries then you could eliminate two
  865.  instructions, but there again, it's not worth doing. This random function
  866.  will give you a very random signal :). There is only one problem with this
  867.  algorithm, and that is, the randomness will always follow the same pattern.
  868.  If this feature undesirable, then you may like to make an initiation module
  869.  that jumbles up the seeds or the numbers a bit. An obvious way of randomly
  870.  choosing a seed, would be to store a fixed reference variable in memory.
  871.  For example:
  872.  
  873.          proc randomise
  874.            mov  al,[043253445h]
  875.            mov  [byte random_seed1],al
  876.            mov  al,[012345678h]
  877.            mov  [byte random_seed2],al
  878.            ret
  879.          endp
  880.  
  881.  Anyway, I'm going to stop here as it's getting very close the deadline
  882.  time. One day, I'll learn not to leave things till last minute. In the next
  883.  part, I'll be hopefully finishing up this assembly series and moving on to
  884.  my talks of sound/tracker programming (the interesting stuff).
  885.  
  886.  I'll be soon releasing a tracker that I have written called FunkTracker.
  887.  With this will be the full source code listing. My discussions will be
  888.  based around my knowledge and experience when producing current and past
  889.  trackers and players, and discussing implementation and hardware issues. I
  890.  also plan to discuss reverse engineering using microsoft CodeView, and plan
  891.  to obtain hack docs on the AWE32 card. So this will be all coming up!.
  892.  until next time.
  893.  
  894.  See ya
  895.  :Jason Nunn
  896.  
  897.  
  898. _____BSP Trees by Tom Verbeure
  899.  
  900.  Problem situation: sorting polygons is slow and can be incorrect for
  901.  certain view-angles. Heavily influenced by Computer Graphics, Principles
  902.  and Practice, I have written this small tutorial for BSP trees, which
  903.  solves the problem for static objects and for every view angle.
  904.  
  905.  As I already said: Binary Space Partitioning Tree. Unlike many other
  906.  abbreviations, this one really explains a lot of the algorithm: it uses a
  907.  tree. It partitions space and it partitions in two parts.
  908.  
  909.  First: it is only usefull in static scenes: no 3D morphing or other goodies
  910.  are allowed.
  911.  
  912.  Let's go to the 2D case, 3D is exactly the same.
  913.  Take a sample scene:
  914.  
  915.          A\        -----   C|
  916.            \   B       E    |
  917.            ------   |
  918.                  |
  919.             /     .
  920.            /      V
  921.          D/
  922.  
  923.  The positive side of the polygons is the side with the defining
  924.  character... Ignore V for now.
  925.  
  926.  One could sort this thing during rendering, but as there can be no correct
  927.  sort criterium and sorting is slow, we don't want that. Besides, we have
  928.  memory to spare :-)
  929.  
  930.  Now, we're going to build a tree that is totally viewpoint independent:
  931.  
  932.  Take polygon B as the root. Polygon B divides space in to parts: the
  933.  positive and the negative side (Geee!) We have partitoned space in two.
  934.  
  935.  First, scrap B from the 'not-used' polygons-array and classify the
  936.  remaining polygons. Group those on the + side, and those on the - side. As
  937.  you can see, polygon C is both on the + and the - side. What to do? Create
  938.  2 new polygons C+ and C-, erase C. Is there another complainer ? Nope: all
  939.  poly's are on either the + or the - side. Now we have this situation:
  940.  
  941.                     B
  942.                    / \
  943.              A,C+,E   D,C-
  944.  
  945.  Not really a tree yet, but we've only started...
  946.  
  947.  Now, do the same thing for the groups at the child nodes, without caring
  948.  about those in another child-node.
  949.  
  950.  For the + side of B, we have polys A,C+ and E. Take A as next node polygon.
  951.  Neither C+ nor E are on it's negative side (we ignore D and C-). For the
  952.  other node, take D as next node polygon. Only C- remains there, and it is
  953.  on the negative side. That side of the tree is finished. We have the
  954.  following situation:
  955.  
  956.                     B
  957.                    / \
  958.                   /   \
  959.                  A     D
  960.                   \     \
  961.                 C+,E     C-
  962.  
  963.  There's one child with more that one poly left. Take C+ as node polygon, E
  964.  become it's child, on the positive side. We're finished.
  965.  Situation:
  966.  
  967.                     B
  968.                    / \
  969.                   /   \
  970.                  A     D
  971.                   \     \
  972.                    C+    C-
  973.                   /
  974.                  E
  975.  
  976.  Now, what can we do with it? A lot... Suppose the viewpoint is at position
  977.  V. In which order do we have to sort the polygons, when using a back to
  978.  front rendering algorithm ? Answer: walk the tree, make sure all nodes
  979.  (including children) are visited.
  980.  
  981.  Start at the root. Is V on the positive side? Nope, well, we want the polys
  982.  far away first, so walk the positive way. Are we on the positive side of A?
  983.  Yep, walk the negative way. It is empty! Ah. Well, draw A first. The go the
  984.  positive way. Are we positive of C+? Yep. Negative way of C+ is empty. Draw
  985.  C+ poly. Go positive way of C+. E has no child, draw it. Go up until a
  986.  non-empty branch is found, draw all node polygon not drawn already. We now
  987.  arrive at B again. Draw it. Negative is not visited yet, walk it. We're
  988.  negative of D. Positive way is empty. Draw D and go negative. C- has no
  989.  child. Draw it. All nodes have been visited. The end.
  990.  
  991.  We have drawn the polygons in following order:
  992.  
  993.  A, C+, E, B, D, C- which is a correct order. The BSP tree has to be
  994.  constructed only once and for all. From then on, sorting the polygons is
  995.  always correct and in linear time. Standard sorting algorithms can be
  996.  proved to be of n*log(n) order of time, so we have an increase in speed as
  997.  well.
  998.  
  999.  Disadvantages:
  1000.  
  1001.  - Memory: one has to have the tree in memory. This can be substantial for
  1002.        lots of polygons.
  1003.  - Polygon splitting: one ends up with more split polygons. It is almost
  1004.        always unavoidable to do splitting.
  1005.  - Polygons are not allowed to move.
  1006.  
  1007.  A BSP tree is NOT unique: just pick another polygon as a node and one gets
  1008.  a different one. In this case, one can avoid splitting polygons: start with
  1009.  a root and build the following, correct, BSP tree:
  1010.  
  1011.                 C
  1012.                /
  1013.               B
  1014.              / \
  1015.             A   D
  1016.            /
  1017.           E
  1018.  
  1019.  Tadaam! No polygon splitting!
  1020.  
  1021.  Building a tree with as little splitting as possible is an exponential of
  1022.  the number of polygons. As Foley and Van Dam says, just try a limited
  1023.  number of nodepolygons, pick the one with the least splitting and the tree
  1024.  will be good enough.
  1025.  
  1026.  Voila. That's it. Not too difficult I think. Notice BSP trees are also
  1027.  usefull to sort objects, by using planes that divide the space in such a
  1028.  way that Object A is on the negative and Object B is on the positive side
  1029.  of the plane. Very useful (only for non-intersecting objects).
  1030.  
  1031.  This text is written without the Bible (Computer Graphics, P&P) besides me,
  1032.  but since I read their chapter about BSP trees many times, it contains
  1033.  almost the same info.
  1034.  
  1035.  For polygon splitting algorithmes, there is one in Graphics Gems. I don't
  1036.  know which one, but buy all four books, you won't be disappointed... :-)
  1037.  
  1038.  Tom Verbeure
  1039.  Synergy Design
  1040.  
  1041. ,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,
  1042.  
  1043.  <<Back Issues>>
  1044.  
  1045. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  1046.  
  1047. _____How to Get 'em
  1048.  
  1049.  After reading this issue of DemoNews, you may be wondering how you can get
  1050.  previous ones.  Well fear not!  There are two different ways to do so:
  1051.  
  1052.  1: FTP to hornet.eng.ufl.edu and go to /pub/msdos/demos/news/OLD_NEWS and
  1053.     start downloading anything you see.
  1054.  
  1055.  2: Now you can request back issues of DemoNews via e-mail.  Start a letter
  1056.     to listserver@oliver.sun.ac.za (any subject line) and in the body of the
  1057.     letter include "get demuan-list <index>" where INDEX refers to the
  1058.     index number of the issue.
  1059.  
  1060.     For example:  get demuan-list 43
  1061.  
  1062.     This would retrieve DemoNews #76 (part 1 of 2).
  1063.  
  1064.     For more recent issues that are split into multiple parts, you must send
  1065.     an individual request for each index number.
  1066.  
  1067. _____Descriptions
  1068.  
  1069. Issue  Index  Date      Size    Description
  1070. -----  -----  --------  ------  ----------------------------------------------
  1071.   75   41,42  12/18/94   68009  A DemoNews Reader, The Birth of Commercial
  1072.                                 Life, Editorial: Calm Before the Storm,
  1073.                                 Interview with Mello-D, US Demo Scene
  1074.                                 (Renaissance meeting), Jelly Tots and Pizza
  1075.                                 Shops, Review of Wired '94 Graphics.
  1076.  
  1077.   76   43,44  12/25/94   92589  Interview with EMF, DemoNews Readers Write,
  1078.                                 Kimba's Life Story, X-Mas in the Demo Scene,
  1079.                                 CORE, Demo & Music Database, Interview with
  1080.                                 Purple Motion/Future Crew, Interview with
  1081.                                 Krystall/Astek, Common Sense ][ by Perisoft,
  1082.                                 Its X-Mas in Africa, Interview with Maxwood
  1083.                                 of Majic 12, Assembly Part ][, Common Sense
  1084.                                 Response by Stony.
  1085.  
  1086.   77   45,46  01/01/95  101100  Chart History, Snowman Near-Disaster, Son of
  1087.                                 Snowman, The Party 1994, Making Waves, Using
  1088.                                 Assembly Part 2.
  1089.  
  1090.   78   47-49  01/08/95  111185  The Party 1994: Results and Reviews, Report
  1091.                                 by Stony and Friends, What happened to PC-
  1092.                                 Demo competition.  Editorial: TP94 = ASM94
  1093.                                 part 2.  Egg2: Trancescrambled Review, More
  1094.                                 on Fast Tracker 2.03.  General Rambling by
  1095.                                 Denthor.
  1096.  
  1097.   79   51     01/15/95   41832  A Day in the Life of Snowman, Ambient Sample
  1098.                                 CD 1, Where's the Sound Blaster, TP94
  1099.                                 Graphics review.
  1100.  
  1101.   80   55     01/22/95   27028  DemoNews/HTML, Traffic Jam, CodeThink(School);
  1102.                                 The Solo Sample CD
  1103.  
  1104. ,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,
  1105.  
  1106.  <<Closing Comments>>
  1107.  
  1108. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  1109.  
  1110.  The quote this week comes from "Assembly Language for the PC, Third
  1111.  Edition". p.174
  1112.  
  1113.     "A program is never done...but it must be stopped somewhere."
  1114.  
  1115.  This was intended as a moral for programmers, but with a little rewording
  1116.  the message is applicable to many areas in life.
  1117.  
  1118.  See you in CyberSpace,
  1119.  
  1120.                         -Christopher G. Mann (Snowman)-
  1121.                             r3cgm@dax.cc.uakron.edu
  1122.  
  1123. ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,End.of.DemoNews.081.
  1124.  
  1125.